package com.zmj.sy.mom.srv.aps.controller;

import com.zmj.sy.mom.srv.aps.bean.vo.auto.AutoReportReqVo;
import com.zmj.sy.mom.srv.aps.bean.vo.base.BaseResVo;
import com.zmj.sy.mom.srv.aps.service.AutoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RequiredArgsConstructor
@Api(tags = "自动处理流程")
@RestController
@RequestMapping("/auto")
public class AutoController {

    private final AutoService autoService;

    @ApiOperation("自动报工")
    @PostMapping("/report")
    public BaseResVo report(@RequestBody AutoReportReqVo reqVo) {
        autoService.report(reqVo);
        return BaseResVo.ok();
    }
}
